package group.rober.base.filter;

import group.rober.saber.holder.WebHolder;
import org.apache.shiro.session.UnknownSessionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class WebHolderFilter implements Filter {
    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    public void init(FilterConfig filterConfig) throws ServletException {

    }

    public void doFilter(ServletRequest req, ServletResponse rep, FilterChain chain) throws IOException, ServletException {
        try{
            chain.doFilter(req,rep);
        }catch(UnknownSessionException e){
            logger.warn("---------->未知会话异常:"+e.getMessage());
        }
    }

    public void destroy() {

    }
}
